{% extends "base.html" %}

{% block title %}Login to Anthias{% endblock %}

{% block content %}
<div class="container mt-5">
  <div class="row justify-content-center">
    <div class="col-md-6">
      <div class="card">
        <div class="card-header">
          <h4 class="mb-0">Login to Anthias</h4>
        </div>
        <div class="card-body">
          {% if messages %}
          <div class="alert alert-danger">
            {% for message in messages %}
            {{ message }}
            {% endfor %}
          </div>
          {% endif %}

          <form method="post" action="{% url 'anthias_app:login' %}">
            {% csrf_token %}
            <input type="hidden" name="next" value="{{ next }}">

            <div class="form-group mb-3">
              <label for="username">Username</label>
              <input type="text" class="form-control shadow-none" id="username" name="username" required>
            </div>

            <div class="form-group mb-3">
              <label for="password">Password</label>
              <input type="password" class="form-control shadow-none" id="password" name="password" required>
            </div>

            <button type="submit" class="btn btn-primary">Login</button>
          </form>
        </div>
      </div>
    </div>
  </div>
</div>
{% endblock %}
